<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: edgelist</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: edgelist</td>
      <td class="subheader-left"><a href="matlab:open edgelist">View code for edgelist</a></td>
    </tr>
  </table>
<h1>edgelist</h1><p><span class="helptopic">Return list of edge pixels for region</span></p><p>
<strong>eg</strong> = <span style="color:red">edgelist</span>(<strong>im</strong>, <strong>seed</strong>) is a list of edge pixels (2xN) of a region in the
image <strong>im</strong> starting at edge coordinate <strong>seed</strong>=[X,Y].  The <span style="color:red">edgelist</span> has one column per
edge point coordinate (x,y).

</p>
<p>
<strong>eg</strong> = <span style="color:red">edgelist</span>(<strong>im</strong>, <strong>seed</strong>, <strong>direction</strong>) as above, but the direction of edge
following is specified.  <strong>direction</strong> == 0 (default) means clockwise, non
zero is counter-clockwise.  Note that direction is with respect to y-axis
upward, in matrix coordinate frame, not image frame.

</p>
<p>
[<strong>eg</strong>,<strong>d</strong>] = <span style="color:red">edgelist</span>(<strong>im</strong>, <strong>seed</strong>, <strong>direction</strong>) as above but also returns a vector
of edge segment directions which have values 1 to 8 representing W SW S SE E
NW N NW respectively.

</p>
<h2>Notes</h2>
<ul>
  <li>Coordinates are given assuming the matrix is an image, so the indices are
always in the form (x,y) or (column,row).</li>
  <li>IM is a binary image where 0 is assumed to be background, non-zero
is an object.</li>
  <li>SEED must be a point on the edge of the region.</li>
  <li>The seed point is always the first element of the returned edgelist.</li>
  <li>8-direction chain coding can give incorrect results when used with
blobs founds using 4-way connectivty.</li>
</ul>
<h2>Reference</h2>
<ul>
  <li>METHODS TO ESTIMATE AREAS AND PERIMETERS OF BLOB-LIKE OBJECTS: A COMPARISON
Luren Yang, Fritz Albregtsen, Tor Lgnnestad and Per Grgttum
IAPR Workshop on Machine Vision Applications Dec. 13-15, 1994, Kawasaki</li>
</ul>
<h2>See also</h2>
<p>
<a href="ilabel.html">ilabel</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>